<!doctype html>
<html>

	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="../css/mui.css" rel="stylesheet" />
		<link href="../css/common.css" rel="stylesheet" />
		<style>
			/* body{
				background-color: white;
			} */
			.mui-content{
				background-color: white;
			}
			.content-title{
				text-align: center;
				margin-bottom: 0.5em;
			}
			.xq-padding-content{
				background-color: white;
				margin-top: 44px;
				padding: 1rem;
			}
			.content-detail{
				padding: 0.5rem;
				font-size: 16px;
				line-height: 1.8em;
			}
		</style>
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title" id="writter-attr-header-title">标题</h1>
		</header>
		<div class="mui-content">
			<div class="mui-scroll-wrapper">
				<div class="mui-scroll">
					<div class="xq-padding-content select-able" id="writter-attr-content">
						<div class="content-title" show-name='attrName'></div>
						<div class="content-detail" show-name='attrValue'></div>
					</div>
				</div>
			</div>
		</div>
		<script src="../js/mui.js"></script>
		<script src="../js/jquery-3.3.1.js"></script>
		<script src="../js/commonUtils.js"></script>
		<script type="text/javascript">
			mui.init();
			mui('.mui-scroll-wrapper').scroll();
			mui.ready(function(e){
				if(mui.os.plus){
					return;
				}
				var randomId=Math.floor(Math.random()*1000+1);
				initWritterAttrPage(randomId);
			});
			//
			mui.plusReady(function(e){
				var self = plus.webview.currentWebview();
				var infoId = self.infoId;//获得参数
				var infoTitle=self.infoTitle;
				if(!infoId){
					infoId=Math.floor(Math.random()*1000+1);
				}
				if(infoTitle){
					$("#writter-attr-header-title").html(infoTitle);
				}
				console.info('infoId='+infoId);
				initWritterAttrPage(infoId)
			});
			//
			function initWritterAttrPage(attrId){
				//SettingInfoManager.timeCheckAndSetPageFontFromSetting("writerAttrValue");
				SettingInfoManager.setPageFontFromSetting();
				var url=getShiciServiceHost()+'/shici/writer/detailAttr';
				muiAjaxGetJsonData({
					showLoading:true,
					url:url,
					data:{attrId:attrId},
					callback:function(data){
						if(!data.entry){
							return;
						}
						replaceNextLine(data.entry,"attrValue",false);
						fillDataToTpl("#writter-attr-content",data.entry);
					},
				});
			}
		</script>
	</body>

</html>
